package com.netx.ut.lib.hibernate;


public class Product extends EntityInstance {

	private String _productId;
	private String _name;
	private Double _price;
	
	public Product() {}

	public String getProductId() { return _productId; }
	public Product setProductId(String value) { _productId = value; return this; }
	public String getName() { return _name; }
	public Product setName(String value) { _name = value; return this; }
	public Double getPrice() { return _price; }
	public Product setPrice(Double value) { _price = value; return this; }

	public boolean equals(Object o) {
		if(o == null) {
			return false;
		}
		if(!(o instanceof Product)) {
			return false;
		}
		Product p = (Product)o;
		if(_productId == null && p._productId != null) {
			return false;
		}
		return getProductId().equals(p.getProductId());
	}
	
	public int hashCode() {
		if(_productId == null) {
			return 0;
		}
		return _productId.hashCode();
	}
}
